Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Use 'cls' (not 'self') in class methods #219

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Conversation

adrienverge
Copy link
Owner

There is no self when there is no instance. Only the static class cls means anything in such context. As the linter says:

N804 first argument of a classmethod should be named 'cls'

There is no `self` when there is no instance. Only the static class
`cls` means anything in such context. As the linter says:

    N804 first argument of a classmethod should be named 'cls'
@adrienverge adrienverge merged commit 314da97 into master Aug 28, 2023
10 checks passed
@adrienverge adrienverge deleted the style/class-cls branch August 28, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant